﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ProfanityChecker
{
    public partial class frmOptions : Form
    {
        Settings m_settings;
        public frmOptions(Settings settings)
        {            
            InitializeComponent();
            m_settings = settings;           
            LoadSettings();
        }

        public DialogResult Login()
        {
            frmPassword pass = new frmPassword(m_settings);
            DialogResult result = pass.ShowDialog();
            return result;
        }

        private void LoadSettings()
        {
            txbxProfanities.Text = m_settings.BannedWords; 
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            m_settings.BannedWords = txbxProfanities.Text;
            this.Close();
        }
    }
}
